linux-procfs
The linux-procfs crate is the data snap library for the /proc/
filesystem on the linux os.
This crate reads from /proc
filesystem, scanne it, stores the value into the struct and returns it. This scans and holds only the required values by specifying feature
.
Feature
- minimum support rustc 1.58.1 (db9d1b20b 2022-01-20)
Example
Example 1: load average
use System;
let mut sys = new;
let loadavg = sys.get_loadavg;
println!;
Example 2: disk stats
use System;
let mut sys = new;
let diskstats = sys.get_diskstats;
for disk in diskstats.disks
Changelogs
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.